package com.example.demojpa.Service;

import com.example.demojpa.dao.SqlDaoApp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SqlService {
    @Autowired
    private SqlDaoApp sqlDaoApp;

    public void deleteById(int id){
        String sql = "delete  from user where id = " + id;
        int i = sqlDaoApp.executeUpdate(sql);
        String string = AttachType.NOT_UPLOAD.toString();
        System.out.println(string);
    }

    public enum AttachType {

        NOT_UPLOAD("未上传"), IN_APPROVE("审批中"), APPROVED("审批通过"), FAIL_APPROVE("审核未通过");
        private final String bype;

        AttachType(final String bype) {
            this.bype = bype;
        }

        public String getTypeName() {
            return bype;
        }
    }
}
